home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / doors_1 / galwar75.zip / GALVAR.DOC < prev    next >
Text File  |  1990-07-16  |  17KB  |  470 lines

  1. { Galactic Warzone variable and contstan declarations                   }
  2. { (c) 1989 by Scott M. Baker                                            }
  3. {                                                                       }
  4. {   This file contains all data structures used in the Galactic Warzone }
  5. { data files. It is provided for any users who wish to write their own  }
  6. { utilities for use with Galactic Warzone.                              }
  7.  
  8. unit globals;
  9.  
  10. interface
  11.  
  12. const
  13.  bil: longint = 1500000000;
  14.  mil: longint = 2500000;
  15.  Galwarname='Galactic Warzone version ';
  16.  vernum='7.5';
  17.  Galby=' by ';
  18.  GalAuthor=' Scott M. Baker ';
  19.  numpdevs=15;
  20.  armorhits=150;
  21.  maxshipdam=150;
  22.  NumSDDT=30;
  23. type
  24.  team_rec = record
  25.              name: string[30];
  26.              players: array[1..4] of word;
  27.              numplay: byte;
  28.              password: string[8];
  29.             end;
  30.  
  31.  spy_rec = record
  32.             playernum: integer;
  33.             info: string[75];
  34.             sector: word;
  35.            end;
  36.  
  37.  user_rec = record
  38.              active: boolean;
  39.              turns_left: word;
  40.              timeused: byte;
  41.              real_name: string[30];
  42.              alias: string[30];
  43.              last_day: string[8];
  44.              holds: word;
  45.              eqp: word;
  46.              ore: word;
  47.              org: word;
  48.              fighters: longint;
  49.              credits: longint;
  50.              credit_account: longint;
  51.              stocks: array[1..55] of word;
  52.              mines: word;
  53.              pulsar: word;
  54.              LotteryTickets: word;
  55.              onteam: word;
  56.              genesis: word;
  57.              plasma: word;
  58.              timesdied: word;
  59.              transport: word;
  60.              sector: word;
  61.              feds_destroyed: longint;
  62.              cabal_destroyed: longint;
  63.              devices: array[1..numpdevs] of word;
  64.              devicedat: array[1..numpdevs] of word;
  65.              devicestat: array[1..numpdevs] of word;
  66.              shipstat: array[1..9] of word;
  67.              lasthour: byte;
  68.              lastmin: byte;
  69.             end;
  70.  
  71.  sector_rec = record
  72.                Warps: array[1..8] of word;
  73.                planet: word;
  74.                port: word;
  75.                fighters: longint;
  76.                fighterp: word;
  77.                mines: word;
  78.                minep: word;
  79.               end;
  80.  
  81.  port_rec = record
  82.              class: byte;
  83.              name: string[25];
  84.              eqp: longint;
  85.              org: longint;
  86.              ore: longint;
  87.              oreprod: longint;
  88.              eqpprod: longint;
  89.              orgprod: longint;
  90.              chg_eqp: word;
  91.              chg_ore: word;
  92.              chg_org: word;
  93.             end;
  94.  
  95.  planet_rec = record
  96.                active: boolean;
  97.                name: string[30];
  98.                fighters: longint;
  99.                fighterprod: longint;
  100.                ore, org, eqp: longint;
  101.                oreprod, orgprod, eqpprod: longint;
  102.                mines: longint;
  103.                mineprod: longint;
  104.                fighterp: word;
  105.                cloaks: word;
  106.                stuns: word;
  107.               end;
  108.  
  109. outpost_rec = record
  110.                active: boolean;
  111.                name: string[30];
  112.                ore, org, eqp: longint;
  113.                credits: longint;
  114.                oreprice, orgprice, eqpprice: word;
  115.                class: byte;
  116.                owner: byte;
  117.               end;
  118.  
  119. starbase_rec = record
  120.                active: boolean;
  121.                name: string[30];
  122.                ore, org, eqp: longint;
  123.                credits: longint;
  124.                oreprice, orgprice, eqpprice: word;
  125.                oreprod, orgprod, eqpprod: longint;
  126.                oreinc, orginc, eqpinc: longint;
  127.                fighterprod, mineprod: word;
  128.                fighters: longint;
  129.                mines: word;
  130.                class: byte;
  131.                owner: byte;
  132.                defense: byte;
  133.                phaser: longint;
  134.                shields: longint;
  135.                ambrosia: word;
  136.                transport_price: word;
  137.                cloaks: word;
  138.                stuns: word;
  139.                pulsars: word;
  140.                kryptons: word;
  141.                plasmaEnergy: word;
  142.                SelfDestruct: boolean;
  143.                ProtectPlanet: boolean;
  144.                Cloaking: boolean;
  145.                krorder: boolean;
  146.                storder: boolean;
  147.                bool1,bool2,bool3: boolean;
  148.               end;
  149.  
  150.  message_rec = record
  151.                 lines: array[1..4] of string[80];
  152.                 dest: word;
  153.                 orig: word;
  154.                 timesread: word;
  155.                 datesent: array[1..3] of word;
  156.                end;
  157.  
  158.  
  159.  stock_rec = record
  160.               name: string[30];
  161.               price: longint;
  162.               trend: integer;
  163.               avail: longint;
  164.               prices: array[1..4] of longint;
  165.               value: longint;
  166.               lastvalue: longint;
  167.              end;
  168.  
  169.  general_info = record
  170.                  turns_per_day: word;
  171.                  days_to_delete: word;
  172.                  cost_of_fighter: longint;
  173.                  cost_of_genesis: longint;
  174.                  cost_of_pulsar: longint;
  175.                  cost_of_escape: longint;
  176.                  cost_of_mine: longint;
  177.                  cost_of_lottery: longint;
  178.                  cost_of_anticloak: longint;
  179.                  cost_of_plasma: longint;
  180.                  cost_of_transport: longint;
  181.                  cost_of_hold: longint;
  182.                  cost_of_turn: longint;
  183.                  cost_of_outpost: longint;
  184.                  cost_of_starbase: longint;
  185.                  cabal_days: word;
  186.                  cargo_holds: longint;
  187.                  fighters: longint;
  188.                  credits: longint;
  189.                  sell_eqp, sell_org, sell_ore: word;
  190.                  buy_eqp, buy_org, buy_ore: word;
  191.                  stocks: array[1..55] of stock_rec;
  192.                  password: string;
  193.                  fedreport: array[1..50] of word;
  194.                  fedstrength: array[1..50] of longint;
  195.                  AllowRemote: boolean;
  196.                  cabal_attack_earth: byte;
  197.                  cabal_attack_top_player: byte;
  198.                  cabal_remain_hq: byte;
  199.                  cabal_remain_sec: byte;
  200.                  cabal_num_groups: byte;
  201.                  cabal_revenge: byte;
  202.                  wanderer_move: word;
  203.                  checkwarps: boolean;
  204.                  Registered_name: string[30];
  205.                  Registered_data: string[30];
  206.                  time_today: word;
  207.                  calls_today: word;
  208.                  days: word;
  209.                  time_total: longint;
  210.                  calls_total: longint;
  211.                  lastdate: array[1..4] of word;
  212.                  statson: boolean;
  213.                  statfile: string;
  214.                  gambleon: boolean;
  215.                  triviaenc: boolean;
  216.                  gamblelimit: longint;
  217.                  trivia_cost: longint;
  218.                  trivia_pay: longint;
  219.                  maxholds: word;
  220.                  startvers: string[4];
  221.                  curvers: string[4];
  222.                  dp: array[1..30] of longint;
  223.                  maxcloaks: word;
  224.                  maxstuns: word;
  225.                  maxmines: word;
  226.                  cabal_base_sector: word;
  227.                  cabal_planet_num: word;
  228.                  FedKillPayoff: real;
  229.                  FedKillPercent: real;
  230.                  CabalKillPayoff: real;
  231.                  CabalKillPercent: real;
  232.                  tourny: word;
  233.                  devprice: array[1..100] of longint;
  234.                  amspecial: word;
  235.                  cost_of_repair: longint;
  236.                 end;
  237.  
  238.  playernewsrec = record
  239.                   user: word;
  240.                   msg: string[80];
  241.                  end;
  242.  
  243.  Vault_Rec= Record
  244.             Devices: array[1..100] of longint;
  245.             credits: longint;
  246.             fighters: longint;
  247.             mines: longint;
  248.             plasmas: longint;
  249.             turns: longint;
  250.             genesis: longint;
  251.             holds: longint;
  252.             eqp, ore, org: longint;
  253.             charges: real;
  254.             transport: longint;
  255.             pulsars: longint;
  256.            end;
  257.  team_array= array[1..30] of team_rec;
  258.  team_ptr= ^team_array;
  259.  sector_array= array[1..2000] of sector_Rec;
  260.  sector_ptr= ^sector_rec;
  261.  user_array= array[1..100] of user_Rec;
  262.  user_ptr=^user_array;
  263.  planet_array = array[1..500] of planet_rec;
  264.  planet_ptr=^planet_array;
  265.  route_type= array[1..100] of word;
  266. const
  267.  maxsec=5000;
  268.  numsec: word = 2000;
  269.  classes: array[1..16] of string[35] =
  270.   ('Selling: Equ','Selling: Org','Selling: Ore','Selling: Weapons',
  271.    'Selling: All','Selling: None','Not trading','The Galactic Market',
  272.    'Federation Operations','Gambling','Selling: Information',
  273.    'Offering Transportation','Selling: Devices','Selling: Devices',
  274.    'Providing secure storage','Providing safe refuge');
  275.  num_of_ports: word =420;
  276.  num_orig_ports=420;
  277.  oreprodconst=4;
  278.  orgprodconst=2;
  279.  eqpprodconst=1;
  280.  
  281. type
  282.  devdatatype = (NoData, SecData, TurnData, PersonData, LeftData, CostData, Devtrandata);
  283.  activatetype = (Yes, No);
  284. const
  285.  plasmaunits=10000;
  286.  cloakunits=3000;
  287.  stununits=10000;
  288.  pulsarunits=16000;
  289.  kryptonunits=30000;
  290.  numshipstat=6;
  291.  shipstatdesc: array[1..numshipstat] of string[35]=
  292.                 ('Warp Engines have',        'Ship Computer has',
  293.                  'Sensors have',             'Battle-Group Computer has',
  294.                  'Cargo Bay has',            'Landing Thrusters have');
  295.  numlot=14;
  296.  maxodds=6500;
  297.  lotodds: array[1..numlot] of word=
  298.            (60,120,190,240,400,640,930,1240,1390,2050,2450,2730,3390,6570);
  299.  lotdesc: array[1..numlot] of string[25]=
  300.            ('25 fighters',              '10 holds',           'an Interstel Link',
  301.             'a Genesis Device',         'a Sector Mine',      '250 fighters',
  302.             '75 holds',                 'an Outpost',         'a plasma device',
  303.             'an Early Warning Sensor',  '1000 Fighters',      'a Mine Deflector',
  304.             '250 holds',                'a Krypton Bomb');
  305.  lotdesc2: array[1..numlot] of string[25]=
  306.            ('25 fighters',              '10 holds',           'Interstel Link',
  307.             'Genesis Device',           'Sector Mine',        '250 fighters',
  308.             '75 holds',                 'Outpost',            'Plasma Device',
  309.             'Early Warning Sensor',     '1000 Fighters',      'Mine Deflector',
  310.             '250 holds',                'Krypton Bomb');
  311.  mineshieldhits=5;
  312.  numdev=53;
  313.  devname: array[1..numdev] of string[40] =
  314.            ('Starbase Teleporter',   {1}
  315.             'Early Warning Sensor',  {2}
  316.             'Ship-to-Ship scanner',  {3}
  317.             'Planetary scanner',     {4}
  318.             'Pulsar Tube',           {5}
  319.             'Anticloak sensor',      {6}
  320.             'Sensor Beacon',         {7}
  321.             'Starbase scanner',      {8}
  322.             'Fusion Cell',           {9}
  323.             'Mine Deflector',       {10}
  324.             'Cloaking Device',      {11}
  325.             'AntiCloaking Device',  {12}
  326.             'Emergency Warp',       {13}
  327.             'Krypton Bomb',         {14}
  328.             'Interstel link',       {15}
  329.             'Homing Beacon',        {16}
  330.             'Speed Dock',           {17}
  331.             'Mine Diffuser',        {18}
  332.             'Stun Mine',            {19}
  333.             'Homing Detector',      {20}
  334.             'Homing Jammer',        {21}
  335.             'Phaser Bank-1000',     {22}
  336.             'Phaser Shield-1000',   {23}
  337.             'Phaser Bank-5000',     {24}
  338.             'Phaser Shield-5000',   {25}
  339.             'Renegade Pass',        {26}
  340.             'Distortion Minimizer', {27}
  341.             'Holographic Imager',   {28}
  342.             'Sb-Aware Autopilot',   {29}
  343.             'Scout-Autopilot',      {30}
  344.             'Titanium Armor',       {31}
  345.             'Regenerative Armor',   {32}
  346.             'B-Group ACloak + 25%', {33}
  347.             'Planetary Autodetect', {34}
  348.             'Device Transport',     {35}
  349.             'Krypton Deflect 10%',  {36}
  350.             'Mine Deflector (10)',  {37}
  351.             'Mine Deflector (15)',  {38}
  352.             'Mine Deflector (20)',  {39}
  353.             'Mine Deflector (25)',  {40}
  354.             'Low Armor',            {41}   { 75 turn   }
  355.             'Medium Armor',         {42}   { 250 turn  }
  356.             'Heavy Armor',          {43}   { 1000 turn }
  357.             'Super Regen Armor',    {44}   { 500 turn  }
  358.             'Phaser Shield-10000',  {45}
  359.             'Phaser Bank-10000',    {46}
  360.             'Phaser Shield-20000',  {47}
  361.             'Cloak/Anticloak pack', {48}
  362.             'Scanner Pack',         {49}
  363.             'Invasion Pack',        {50}
  364.             'Red Cylinder',         {51}
  365.             'Blue Cylinder',        {52}
  366.             'Black Box');           {53}
  367.  
  368.  
  369.  odevprice: array[1..numdev] of longint =
  370.             (100000,    75000,    50000,    125000,
  371.              350000,    80000,    30000,    175000,
  372.               20000,   100000,    18000,     22000,
  373.               27000,   250000,     8000,     80000,
  374.               22000,   100000,    50000,     40000,
  375.              160000,   150000,   175000,    575000,
  376.              680000,    60000,   100000,     75000,
  377.               50000,    75000,    50000,    300000,
  378.              250000,    85000,    25000,    500000,
  379.              250000,   500000,   750000,   1000000,
  380.               25000,   100000,   300000,   1000000,
  381.             1500000,  2500000,  3000000,    180000,
  382.             2500000,  7500000,   150000,    500000,
  383.              250000);
  384.  devdata: array[1..numdev] of devdatatype =
  385.             (NoData,     NoData,    NoData,      NoData,
  386.              NoData,     NoData,    SecData,     NoData,
  387.              TurnData,   LeftData,  NoData,      NoData,
  388.              NoData,     NoData,    NoData,      PersonData,
  389.              NoData,     Leftdata,  NoData,      NoData,
  390.              NoData,     NoData,    NoData,      NoData,
  391.              NoData,     NoData,    NoData,      NoData,
  392.              CostData,   NoData,    LeftData,    LeftData,
  393.              NoData,     NoData,    DevTranData, NoData,
  394.              LeftData,   LeftData,  LeftData,    LeftData,
  395.              LeftData,   LeftData,  LeftData,    LeftData,
  396.              NoData,     NoData,    NoData,      NoData,
  397.              NoData,     NoData,    NoData,      NoData,
  398.              NoData);
  399.  devact: array[1..numdev] of activatetype =
  400.             (Yes,        No,        Yes,       Yes,
  401.              Yes,        No,        Yes,       Yes,
  402.              Yes,        No,        No,        No,
  403.              No,         No,        Yes,       Yes,
  404.              No,         Yes,       No,        Yes,
  405.              No,         No,        No,        No,
  406.              No,         No,        No,        No,
  407.              Yes,        No,        No,        No,
  408.              No,         No,        Yes,       No,
  409.              No,         No,        No,        No,
  410.              No,         No,        No,        No,
  411.              No,         No,        No,        No,
  412.              Yes,        No,        No,        No,
  413.              Yes);
  414.  
  415.  
  416. type
  417.  SecPtrArray=array[1..maxsec] of sector_ptr;
  418.  SectorPtrArray=^SecPTrArray;
  419.  
  420. var
  421.  heapstart: longint;
  422.  fastarmor: boolean;
  423.  fastmines: boolean;
  424.  fightertally: longint;
  425.  armortally: longint;
  426.  holdtally: longint;
  427.  codeon2: boolean;
  428.  numdeadends: word;
  429.  initcabal: word;
  430.  bgauto: boolean;
  431.  starbasecheck: boolean;
  432.  quit_in_starbase: boolean;
  433.  user_num: integer;
  434.  current_sector: word;
  435.  ginfo: general_info;
  436.  sectors: SectorPtrArray;
  437.  planets: planet_ptr;
  438.  users: user_ptr;
  439.  teams: team_ptr;
  440.  team_file: file of team_rec;
  441.  sector_file: file of sector_rec;
  442.  port_file: file of port_rec;
  443.  planet_file: file of planet_rec;
  444.  user_file: file of user_Rec;
  445.  outpost_file: file of outpost_rec;
  446.  starbase_file: file of starbase_Rec;
  447.  playernewsfile: file of playernewsrec;
  448.  autopilot: string;
  449.  log: text;
  450.  exitsave: pointer;
  451.  filesopen: boolean;
  452.  excludes: array[1..5] of word;
  453.  onplanet: boolean;
  454.  spyfile: file of spy_rec;
  455.  InDeviceUnit: boolean;
  456.  alreadydone: array[1..maxsec] of boolean;
  457.  trivdone: array[1..2000] of boolean absolute alreadydone;
  458.  secdone: array[1..maxsec] of boolean{ absolute alreadydone};
  459.  codeon: boolean;
  460.  sbcost: word;
  461.  autook: boolean;
  462.  pref: array[1..10] of boolean;
  463.  vaultfile: file of vault_rec;
  464.  sddtold: array[1..NumSDDT] of word; {Sector DDTERM old}
  465.  SDDT: array[1..numsddt] of word;    {Sector DDTERM numbers}
  466.  maxsession,waittime: word;
  467.  maxturns: word;
  468.  
  469. implementation
  470. end.